<!DOCTYPE html>
<!-- html -->
<html>
<!-- head -->

<head>
    <title>个人信息</title>
    <link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
    <!-- bootstrap-CSS -->
    <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script type='text/javascript' src='./js/jquery-2.2.3.min.js'></script>
    <!-- Custom Theme files -->
    <link href="css/menu.css" rel="stylesheet" type="text/css" media="all" />
    <!-- menu style -->
    <!--theme-style-->
    <link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
    <!--//theme-style-->
    <!--meta data-->
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta name="keywords" content="" />
    <style>
    body {
        width: 100%;
        background-color: #00c4da;
        padding: 20px 0px
    }

    #preview_zero img {
        width: 120px;
        height: 120px;
    }

    #preview_first img {
        width: 120px;
        height: 120px;
    }

    .messageInfo {
        padding: 20px 10px;
        width: 80%;
        background-color: #fff;
        margin: 0 auto;
        border-radius: 10px
    }

    h3 {
        background-color: #ec3434;
        font-size: 20px;
        color: #fff;
        border-radius: 5px;
        padding: 5px 10px;
    }

    #register {
        text-align: right;
    }

    .w3-agree input {
        vertical-align: middle;
    }

    .w3_modal_body_grid {
        margin-top: 15px;
    }

    .agileits-register {
        margin-top: 20px
    }

    .error {
        background-color: #ec3434;
        opacity: .8;
        color: #fff;
        margin-left: 30%;
        font-size: 13px;
        padding-left: 5px;
        display: none;
    }

    p.error_apply {
        margin-left: 0px
    }

    div.w3_modal_body_grid1 {
        margin-bottom: 2px;
    }

    div.agileits-register h3 {
        margin-top: 15px
    }

    textarea {
        width: 100%;
        height: 100px;
        max-width: 100%;
        max-height: 100px;
        border: 1px solid #bbb;
    }

    .upload {
        margin-top: 20px;
        position: relative;
        width: 100%;
        height: 150px;
    }

    .upload span {
        font-weight: 600;
        font-size: 14px
    }

    .upload_img {
        text-align: left;
        margin-top: 10px;
        position: absolute;
        top: 30px;
        
    }

    .upload_img input {
        position: absolute;
        top: 0px;
        left: 0px;
        width: 120px;
        height: 120px;
        opacity: 0
    }

    .upload_img img {
        width: 120px;
        height: 120px;
    }

    #preview_second img {
        width: 120px;
        height: 120px;
    }

    #preview_third img {
        width: 120px;
        height: 120px;
    }

    #apply input {
        width: 100%;
        background-color: #00c4da;
        ;
        border: 0px;
        padding: 10px 0px;
        margin-top: 20px;
        border-radius: 5px;
        color: #fff;
    }

    .radio_choose .radio {
        display: inline-block;
        padding-top: 10px;
        margin-right: 10px
    }

    .radio_choose .radio i {
        background-color: #fff;
        border: 1px solid #ec3434;
        border-radius: 50%;
        margin-top: 10px
    }

    .radio_choose .radio input+i:after {
        background-color: #ec3434 !important;
    }

    #ui-datepicker-div {
        width: 70%;
    }

    .ui-datepicker-calendar {
        margin-right: 10px;
        background-color: #fff;
        border: 1px solid #00c4da
    }

    .upload label {
        margin-left: 10px;
        background-color: #00c4da;
        padding: 2px 5px;
        color: #fff;
        border-radius: 4px
    }

    #float_view {
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.4);
        position: fixed;
        top: 0px;
        left: 0px;
        z-index: 666;
    }

    #msg {
        width: 60%;
        position: absolute;
        height: 60px;
        background: white;
        top: 200px;
        left: 20%;
        border-radius: 8px;
        text-align: center;
        color: red;
        line-height: 60px;
        font-size: 20px;
        margin-bottom: 10px;
    }
    .phoneButton{
        width: 100%;
        text-align: center;
        /*background: #d1d1d1;*/
        color: white;
        background: #00c4da;
        line-height: 30px;
        border-radius: 4px;
        font-size: 12px;
        float: right;

    }
    </style>
    <script type="text/javascript">
    function isWeixnOpen() {

        var ua = navigator.userAgent.toLowerCase();

        if (ua.match(/MicroMessenger/i) == "micromessenger") {

            return true;

        } else {

            return false;

        }

    }
    $(function() {
        if (isWeixnOpen()) {

        } else {
            // document.oncontextmenu=new Function("event.returnValue=false;");
            // document.onselectstart=new Function("event.returnValue=false;");
            // $("body").text("请在微信打开");
            // $("body").css("text-align","center");
        }
    })
    </script>
    <!-- //nav smooth scroll -->
    <!-- Calendar -->
    <link rel="stylesheet" href="css/jquery-ui.css" />
    <script src="js/jquery-ui.js"></script>
    <script>
    $(function() {
        $("#datepicker").datepicker();
    });
    </script>
    <!-- //Calendar -->
    <link rel="stylesheet" href="css/intlTelInput.css">
</head>
<!-- //head -->
<!-- body -->

<body>
    <div id="float_view">
        <div id="msg">
        </div>
    </div>
    <div class="messageInfo">
        <form action="./index_add.html" method="post" id="form_register">
            <h3>基本信息</h3>
            <div class="w3_modal_body_grid w3_modal_body_grid1">
                <span>昵称:</span>
                <input type="text" name="cName" placeholder="" />
            </div>
            <p class="error error_one">昵称不能为空</p>
            <div class="w3_modal_body_grid w3_modal_body_grid1">
                <span>姓名:</span>
                <input type="text" name="Name" placeholder="" />
            </div>
            <p class="error error_two_reg">请输入中文名</p>
            <p class="error error_two">姓名不能为空</p>
            <div class="w3_modal_body_grid">
                <span>性别:</span>
                <div class="radio_choose radio_gender">
                    <label class="radio">
                        <input type="radio" name="gender" value='0'><i></i>男
                    </label>
                    <label class="radio">
                        <input type="radio" name="gender" value='1'><i></i>女
                    </label>
                </div>
            </div>
            <div class="w3_modal_body_grid w3_modal_body_grid1">
                <span>工作:</span>
                <input type="text" name="work" placeholder=" " />
            </div>
            <div class="w3_modal_body_grid w3_modal_body_grid1">
                <span>身份证号:</span>
                <input type="text" name="codeNum" placeholder=" " />
            </div>
            <div class="w3_modal_body_grid w3_modal_body_grid1">
                <span>手机号:</span>
                <input type="text" name="number" placeholder=" " />
            </div>
            <p class="error error_three">手机号不能为空</p>
            <p class="error error_three_reg">手机号格式不正确</p>
            <div class="w3_modal_body_grid">
                <span>邮箱:</span>
                <input type="email" name="Email" placeholder=" " />
            </div>
            <p class="error error_four">邮箱不能为空</p>
            <div class="w3_modal_body_grid w3_modal_body_grid1">
                <span>登陆密码:</span>
                <input type="password" name="Password" placeholder="" />
            </div>
            <p class="error error_five">密码不能为空</p>
            <div class="w3_modal_body_grid w3_modal_body_grid1">
                <span>身高:</span>
                <input type="text" name="height" placeholder="单位为cm" />
            </div>
            <p class="error error_six">请输入数字</p>
            <div class="w3_modal_body_grid w3_modal_body_grid1">
                <span>体重:</span>
                <input type="text" name="weight" placeholder="单位为kg" />
            </div>
            <p class="error error_seven">请输入数字</p>
            <div class="w3_modal_body_grid">
                <span>婚姻:</span>
                <div class="radio_choose radio_merry">
                    <label class="radio">
                        <input type="radio" name="merry" value='0'><i></i>未婚
                    </label>
                    <label class="radio">
                        <input type="radio" name="merry" value='1'><i></i>离异
                    </label>
                    <label class="radio">
                        <input type="radio" name="merry" value='2'><i></i>丧偶
                    </label>
                </div>
            </div>
            <div class="w3_modal_body_grid">
                <span>子女状况:</span>
                <div class="radio_choose radio_children">
                    <label class="radio">
                        <input type="radio" name="children" value='0'><i></i>无子女
                    </label>
                    <label class="radio">
                        <input type="radio" name="children" value='1'><i></i>有子女
                    </label>
                </div>
            </div>
            <div class="w3_modal_body_grid">
                <span>性格爱好:</span>
                <textarea rows="4" cols="50" name="interest" id="interest"></textarea>
            </div>
            <div class="w3_modal_body_grid">
                <span>户口所在地:</span>
                <input type="text" name="household" placeholder=" " />
            </div>
            <div class="w3_modal_body_grid">
                <span>住房情况:</span>
                <input type="text" name="housestate" placeholder=" " />
            </div>
            <div class="w3_modal_body_grid">
                <span>身体状况:</span>
                <input type="text" name="bodyStatus" placeholder=" " />
            </div>
            <div class="w3_modal_body_grid w3_modal_body_grid1">
                <span>择偶标准:</span>
                <textarea rows="4" cols="50" name="spouse" id="spouse"></textarea>
            </div>
            <h3>实名认证信息</h3>
            <div class="w3_modal_body_grid w3_modal_body_grid1" >
                <span>手机号验证:</span>
                <input type="text" name="mobileVC" placeholder="" />
              <!--   <label class="phoneButton" style="width: 100px !important;">
               
                </label> -->
            </div>
            <div class=" w3_modal_body_grid w3_modal_body_grid1" style="padding-bottom: 20px;">
               <div class="phoneButton">获取手机验证码</div>  
            </div>
            <p class="error error_eight">请输入数字</p>
            <div class="upload" style="clear: both;">
                <span>个人头像上传:<label onclick="upload(1)">确定上传</label></span>
                <br/>
                <div id="preview_zero"></div>
                <div class="upload_img" id="upload_one">
                    <img id="preview_none_zero" src="./images/upload-img.png">
                    <input type="file" id="ipcardz" name="upload_img" />
                </div>
            </div>
            <div class="upload">
                <span>身份证正面照上传:<label onclick="upload(2)">确定上传</label></span>
                <br/>
                <div id="preview_first"></div>
                <div class="upload_img" id="upload_two">
                    <img id="preview_none_first" src="./images/upload-img.png">
                    <input type="file" id="ipcardf" name="upload_img" />
                </div>
            </div>
            <div class="upload">
                <span>身份证背面照上传:<label onclick="upload(3)">确定上传</label></span>
                <br/>
                <div id="preview_second"></div>
                <div class="upload_img" id="upload_three">
                    <img id="preview_none_second" src="./images/upload-img.png">
                    <input type="file" id="ipcard" name="upload_img" />
                </div>
            </div>
            <div class="upload">
                <span>手持身份证上传:<label onclick="upload(4)">确定上传</label></span>
                <br/>
                <div id="preview_third"></div>
                <div class="upload_img" id="upload_four">
                    <img id="preview_none_third" src="./images/upload-img.png">
                    <input type="file" id="hold_ipcard" name="upload_image" />
                </div>
            </div>
            <div id="apply">
                <input type='submit' value='提交' />
            </div>
        </form>
    </div>
    <!-- Find your soulmate -->
    <script src="js/bootstrap.js"></script>
</body>
<script type="text/javascript">

$("#float_view").hide();
var ipcard, hold_ipcard, ipImage1, ipImage2, ipImage3, ipImage4, Gender = 0,
    Merry = 0,
    Children = 0;
var mem_img,
    id_cardImgz,
    id_cardImgf,
    id_cardImga;
$(function() {
    // console.log(localStorage.getItem('userInfo'))
    //获取用户信息
    $.ajax({
        url: "/member/getMemberinfoByNum?number=" + localStorage.getItem('number'),
        type: "get",
        dataType: "json",
        success: succesFunc,
        error: errorFunc
    });

    function succesFunc(res) {
        console.log(res)
        if (res.code == 200) {
            var item = res.data[0]
            if (item.nickname) {
                $("input[name=cName]").val(item.nickname)
            }
            if (item.mem_name) {
                $("input[name=Name]").val(item.mem_name)
            }
            if (item.gender) {
                Gender = parseInt(item.gender)
                $('.radio_gender .radio').eq(Gender).find('i').css('background-color', '#ec3434')
            } else {
                $('.radio_gender .radio').eq(Gender).find('i').css('background-color', '#ec3434')
            }
            if (item.occupation) {
                $("input[name=work]").val(item.occupation)
            }
            if (item.id_number) {
                $("input[name=codeNum]").val(item.id_number)
            }
            if (item.mobile) {
                $("input[name=number]").val(item.mobile)
            }
            if (item.email) {
                $("input[name=Email]").val(item.email)
            }
            if (item.passWord) {
                $("input[name=Password]").val(item.passWord)
            }

            if (item.height == 0) {
                $("input[name=height]").val()
            } else {
                $("input[name=height]").val(item.height)
            }
            if (item.body_weight == 0) {
                $("input[name=weight]").val()
            } else {
                $("input[name=weight]").val(item.body_weight)
            }
            if (item.marital_status) {
                Merry = item.marital_status
                $('.radio_merry .radio').eq(Merry).find('i').css('background-color', '#ec3434')
            } else {
                $('.radio_merry .radio').eq(Merry).find('i').css('background-color', '#ec3434')
            }
            if (item.has_children) {
                Children = item.has_children
                $('.radio_children .radio').eq(Children).find('i').css('background-color', '#ec3434')
            } else {
                $('.radio_children .radio').eq(Children).find('i').css('background-color', '#ec3434')
            }
            if (item.character_love) {
                $('#interest').val(item.character_love)
            }
            if (item.account_location) {
                $("input[name=household]").val(item.account_location)
            }
            if (item.housing_status) {
                $("input[name=housestate]").val(item.housing_status)
            }
            if (item.body_condition) {
                $("input[name=bodyStatus]").val(item.body_condition)
            }
            if (item.love_object) {
                $("#spouse").val(item.love_object)
            }
            if (item.bar_code) {
                $("input[name=mobileVC]").val(item.bar_code)
            }
            if (item.mem_img) {
                $("#preview_none_zero").attr('src', filterImage(item.mem_img))
                mem_img = item.mem_img;
            }
            if (item.id_cardImgz) {
                $("#preview_none_first").attr('src', filterImage(item.id_cardImgz))
                id_cardImgz = item.id_cardImgz;
            }
            if (item.id_cardImgf) {
                $("#preview_none_second").attr('src', filterImage(item.id_cardImgf))
                id_cardImgf = item.id_cardImgf;
            }
            if (item.id_cardImga) {
                $("#preview_none_third").attr('src', filterImage(item.id_cardImga))
                id_cardImga = item.id_cardImga;
            }
        }
    }

    function errorFunc(resquest) {
        $("#float_view").show();
        $('#msg').text("修改失败");
    }

    function filterImage(msg) {
        if (msg) {
            return "http://localhost:3000/images" + msg.split("images")[1];
        } else {
            return './images/p6.jpg';
        }
    }
})

$('#ipcardz').change(function() {
    var prevDiv = document.getElementById('preview_zero');
    var prevImg = document.getElementById('preview_none_zero');
    if (this.files && this.files[0]) {
        var reader = new FileReader();
        reader.onload = function(evt) {
            prevImg.style.display = 'none'
            prevDiv.innerHTML = '<img src="' + evt.target.result + '" />';
            ipcard = evt.target.result;
            ipImage1 = this.result
        }
        reader.readAsDataURL(this.files[0]);

    }
})
$('#ipcardf').change(function() {

    var prevDiv = document.getElementById('preview_first');
    var prevImg = document.getElementById('preview_none_first');
    if (this.files && this.files[0]) {
        var reader = new FileReader();
        reader.onload = function(evt) {
            prevImg.style.display = 'none'
            prevDiv.innerHTML = '<img src="' + evt.target.result + '" />';
            ipcard = evt.target.result;
            ipImage2 = this.result
        }
        reader.readAsDataURL(this.files[0]);

    }
})
$('#ipcard').change(function() {

    var prevDiv = document.getElementById('preview_second');
    var prevImg = document.getElementById('preview_none_second');
    if (this.files && this.files[0]) {
        var reader = new FileReader();
        reader.onload = function(evt) {
            prevImg.style.display = 'none'
            prevDiv.innerHTML = '<img src="' + evt.target.result + '" />';
            ipcard = evt.target.result;
            ipImage3 = this.result
        }
        reader.readAsDataURL(this.files[0]);

    }
})
$('#hold_ipcard').change(function() {
    var prevDiv = document.getElementById('preview_third');
    var prevImg = document.getElementById('preview_none_third');
    if (this.files && this.files[0]) {
        var reader = new FileReader();
        reader.onload = function(evt) {
            prevImg.style.display = 'none'
            prevDiv.innerHTML = '<img src="' + evt.target.result + '" />';
            hold_ipcard = evt.target.result;
            ipImage4 = this.result
        }
        reader.readAsDataURL(this.files[0]);
    }
})
// 性别
$('.radio_gender .radio').each(function() {
    $(this).click(function() {
        Gender = $(this).index()
        $(this).find('i').css('background-color', '#ec3434')
        $(this).siblings().find('i').css('background-color', '#ffffff')
        $(this).attr('value', $(this).index())
    })
})
// 婚姻
$('.radio_merry .radio').each(function() {
    $(this).click(function() {
        Merry = $(this).index()
        $(this).find('i').css('background-color', '#ec3434')
        $(this).siblings().find('i').css('background-color', '#ffffff')
        $(this).attr('value', $(this).index())
    })
})
// 子女
$('.radio_children .radio').each(function() {
    $(this).click(function() {
        Children = $(this).index()
        $(this).find('i').css('background-color', '#ec3434')
        $(this).siblings().find('i').css('background-color', '#ffffff')
        $(this).attr('value', $(this).index())
    })
})

// 选择职业
var profession
$('.frm-field').change(function() {
    profession = $(this).val()
})
$("form").submit(function(e) {
    e.preventDefault();
    var data = $(this).serialize()
    // // 数字验证
    // numberReg = /^[0-9]*$ / 
    // //   手机号验证
    // var phoneReg = /((\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$)/
    // // 姓名验证
    // var nameReg = /^[\u4e00-\u9fa5]{0,}$/
    // if ($("input[name=cName]").val() == '') {
    //     $('.error_one').css('display','block')
    //     setTimeout(function(){
    //       $('.error_one').css('display','none')
    //     }, 2000)
    //     return
    //   }
    //   if ($("input[name=Name]").val() == '') {
    //     $('.error_two').css('display','block')
    //     setTimeout(function(){
    //       $('.error_two').css('display','none')
    //     }, 2000)
    //     return
    //   }
    //   if (nameReg.test($("input[name=Name]").val()) == false) {
    //     $('.error_two_reg').css('display','block')
    //     setTimeout(function(){
    //       $('.error_two_reg').css('display','none')
    //     }, 2000)
    //     return
    //   }
    //   if ($("input[name=number]").val() == '') {
    //     $('.error_three').css('display','block')
    //     setTimeout(function(){
    //       $('.error_three').css('display','none')
    //     }, 2000)
    //     return
    //   }
    //   if (phoneReg.test($("input[name=number]").val()) == false) {
    //     $('.error_three_reg').css('display','block')
    //     setTimeout(function(){
    //       $('.error_three_reg').css('display','none')
    //     }, 2000)
    //     return
    //   }

    //   if ($("input[name=Email]").val() == '') {
    //     $('.error_four').css('display','block')
    //     setTimeout(function(){
    //       $('.error_four').css('display','none')
    //     }, 2000)
    //     return
    //   }
    //   if ($("input[name=Password]").val() == '') {
    //     $('.error_five').css('display','block')
    //     setTimeout(function(){
    //       $('.error_five').css('display','none')
    //     }, 2000)
    //     return
    //   }
    //   if ($("input[name=cc]").is(':checked') === false) {
    //     $('.error_six').css('display','block')
    //     setTimeout(function(){
    //       $('.error_six').css('display','none')
    //     }, 2000)
    //     return
    //   }
    //   if ($("input[name=height]").val() !== '' && numberReg.test($("input[name=height]").val()) === false) {
    //     $('.error_six').css('display','block')
    //     setTimeout(function(){
    //       $('.error_six').css('display','none')
    //     }, 2000)
    //     return
    //   }
    //   if ($("input[name=weight]").val() !== '' && numberReg.test($("input[name=weight]").val()) === false) {
    //     $('.error_seven').css('display','block')
    //     setTimeout(function(){
    //       $('.error_seven').css('display','none')
    //     }, 2000)
    //     return
    //   }
    //   if ($("input[name=mobile]").val() !== '' && numberReg.test($("input[name=mobile]").val()) === false) {
    //     $('.error_eight').css('display','block')
    //     setTimeout(function(){
    //       $('.error_eight').css('display','none')
    //     }, 2000)
    //     return
    //   }
    //   if ($("input[name=cName]").val() !== '' && $("input[name=Name]").val() !== '' && $("input[name=number]").val() !== '' && $("input[name=Email]").val() !== '' && $("input[name=Password]").val() !== '' && $("input[name=cc]").is(':checked') === true) {
    //     console.log('第一个图片:' + hold_ipcard + '第二个图片:' + ipcard )
    console.log(data)
    console.log("***")
    // window.location.href = './success.html'
    // }
})


function upload(type) {
    switch (type) {
        case 1:
            uploadImage(ipImage1, type); //个人头像
            break;
        case 2:
            uploadImage(ipImage2, type); //身份证正面
            break;
        case 3:
            uploadImage(ipImage3, type); //身份证反面
            break;
        case 4:
            uploadImage(ipImage4, type); //手持身份证相片
            break;
    }
}


function uploadImage(baseImg, type) {
    if (baseImg) {
        var jsonData = {
            "image_base64": baseImg.split(";")[1].split(",")[1],
        }
        $.ajax({
            url: "/member/uploadImage",
            type: "post",
            dataType: "json",
            data: jsonData,
            success: succesFunc,
            error: errorFunc
        });

        function succesFunc(resquest) {
            if(resquest.code==200){
               if (type == 1) {
                mem_img = resquest.url;
            } else if (type == 2) {
                id_cardImgz = resquest.url;
            } else if (type == 3) {
                id_cardImgf = resquest.url;
            } else if (type == 4) {
                id_cardImga = resquest.url;
            }
           $("#float_view").show();
           $('#msg').text("上传成功"); 
       }else{
        $("#float_view").show();
           $('#msg').text("图片过大上传失败"); 
       }
            
        }

        function errorFunc(resquest) {
        $("#float_view").show();
        $('#msg').text("图片过大上传失败");
            console.log(resquest)
        }
    } else {
        $("#float_view").show();

        $('#msg').text("请上传图片");

    }

}
$("#float_view").click(function() {
    $("#float_view").hide();
});

 var num;
 var isSend=true;
$('.phoneButton').click(function(){
   if (isSend){
    getPhoneNum($("input[name=number]").val());
     num=60;
     var timer=setInterval(function(){
    if (num>0) {
      num--;  
      $('.phoneButton').css('background',"#d1d1d1")
      $('.phoneButton').text('('+num+'s)后重发');
    }else{
        clearInterval(timer)
         $('.phoneButton').css('background',"#00c4da")
        $('.phoneButton').text('获取手机验证码'); 
        isSend=true;
    }
   },1000);
     isSend=false;
   }else{
     console.log(122)
   }
   
})
function getPhoneNum(num){
  $.ajax({
            method: "get",
           
            url: "/member/getPhoneCode?mobile="+num,
            success: function(data) {
             
            },
            error: function(error) {
                console.log(error)
            }
        })
}
$('#apply').click(function() {
    if (!$("input[name=mobileVC]").val()) {
        $("#float_view").show();
        $('#msg').text("请输入手机号验证码");

    } else if (!mem_img) {
        $("#float_view").show();
        $('#msg').text("请上传个人头像");


    } else if (!id_cardImgz) {
        $("#float_view").show();
        $('#msg').text("请上传身份证正面照");

    } else if (!id_cardImgf) {
        $("#float_view").show();
        $('#msg').text("请上传身份证背面照");

    } else if (!id_cardImga) {
        $("#float_view").show();
        $('#msg').text("请上传手持身份证");

    } else {
        var json = {
            cName: $("input[name=cName]").val(),
            Name: $("input[name=Name]").val(),
            number: $("input[name=number]").val(),
            Email: $("input[name=Email]").val(),
            Password: $("input[name=Password]").val(),
            gender: Gender,
            work: $("input[name=work]").val(),
            codeNum: $("input[name=codeNum]").val(),
            height: $("input[name=height]").val() || 0,
            weight: $("input[name=weight]").val() || 0,
            merry: Merry || 0,
            children: Children || 0,
            interest: $("#interest").val() || '暂无',
            household: $("input[name=household]").val() || '暂无',
            housestate: $("input[name=housestate]").val() || '暂无',
            bodyStatus: $("input[name=bodyStatus]").val() || '暂无',
            spouse: $("#spouse").val() || '暂无',
            mobileVC: $("input[name=mobileVC]").val(),
            mem_img: window.location.protocol+"//"+location.host+mem_img.split("public")[1],
            id_cardImgz:window.location.protocol+"//"+location.host+id_cardImgz.split("public")[1],
            id_cardImgf:window.location.protocol+"//"+location.host+id_cardImgf.split("public")[1],
            id_cardImga:window.location.protocol+"//"+location.host+id_cardImga.split("public")[1],
        }
        $.ajax({
            method: "post",
            data: json,
            url: "/member/updataMember",
            success: function(data) {
                window.location.href = './success.html'
            },
            error: function(error) {
                console.log(error)
            }
        })
    }

})
</script>

</html>